//package inutan.gateway.balancer;
//
//import org.ricks.common.utils.StringUtils;
//import org.ricks.net.balancer.ConsistentHashConsumerLoadBalancer;
//import org.ricks.net.balancer.IConsumerLoadBalancer;
//import org.ricks.net.balancer.RandomConsumerLoadBalancer;
//import org.ricks.net.balancer.UserOnlineCountLoadBalancer;
//
///**
// * 如果tag分类session维护在 MessageProcessor ，就意味只能在接收网关消息那块处理
// * 如果类似UserSessions 进行封装，单例模式 那就可以哪块需求随时使用
// */
//public abstract class AbstractConsumerLoadBalancer implements IConsumerLoadBalancer {
//
//    public static AbstractConsumerLoadBalancer valueOf(String loadBalancer) {
//        AbstractConsumerLoadBalancer balancer;
//        switch (loadBalancer) {
//            case "random":
//                balancer = RandomConsumerLoadBalancer.getInstance();
//                break;
//            case "consistent-hash":
//                balancer = ConsistentHashConsumerLoadBalancer.getInstance();
//                break;
////            case "module-bind":
////                balancer = ModuleBindConsumerLoadBalancer.getInstance();
////                break;
//            case "user-online":
//                balancer = UserOnlineCountLoadBalancer.getInstance();
//                break;
//            default:
//                throw new RuntimeException(StringUtils.format("Load balancer is not recognized[{}]", loadBalancer));
//        }
//        return balancer;
//    }
//
//
//}
